//
//  ljjiftLabel.ljjift
//  AiTouYun
//
//  Created by liujunjie on 2018/9/15.
//  Copyright © 2018年 junjie.liu. All rights reserved.
//

import UIKit

public extension UILabel {
    
     @discardableResult
    public func ljj_text(_ text: String) -> UILabel {
        self.text = text
        return self
    }
    
     @discardableResult
    public func ljj_textColor(_ color: UIColor) -> UILabel {
        self.textColor = color
        return self
    }
    
     @discardableResult
    public func ljj_backgroundColor(_ color: UIColor) -> UILabel {
        self.backgroundColor = color
        return self
    }
    
     @discardableResult
    public func ljj_fontSize(_ font: CGFloat) -> UILabel {
        self.font = UIFont.systemFont(ofSize: font)
        return self
    }
    
     @discardableResult
    public func ljj_textAlignment(_ alignment: NSTextAlignment) -> UILabel {
        self.textAlignment = alignment
        return self
    }
    
     @discardableResult
    public func ljj_numberLine(_ numbetLine: NSInteger) -> UILabel {
        self.numberOfLines = numbetLine
        return self
    }
    
     @discardableResult
    public func ljj_textName(_ text: String, _ font: CGFloat) -> UILabel {
        self.font = UIFont(name: text, size: font)
        return self
    }
    
     @discardableResult
    public func ljj_border(_ color: UIColor, width: CGFloat) -> UILabel {
        self.layer.borderColor = color.cgColor
        self.layer.borderWidth = width
        self.layer.masksToBounds = true
        return self
    }
    
     @discardableResult
    public func ljj_cornerRadius(_ cornerRadius: CGFloat) -> UILabel {
        self.layer.cornerRadius = cornerRadius
        self.layer.masksToBounds = true
        return self
    }
    
}







